package entities;

public class Location {

    private String locationName;
    private int locationID;
    private int locationLevel;
    private int parentLocationId;

    public Location( String locationName, int locationID, int locationLevel, int parentLocationId) {
        this.locationID = locationID;
        this.locationName = locationName;
        this.locationLevel = locationLevel;
        this.parentLocationId = parentLocationId;
    }

    public int getLocationID() {
        return locationID;
    }

    public void setLocationID(int locationID) {
        this.locationID = locationID;
    }

    public String getLocationName() {
        return locationName;
    }

    public void setLocationName(String locationName) {
        this.locationName = locationName;
    }

    public int getLocationLevel() {
        return locationLevel;
    }

    public void setLocationLevel(int locationLevel) {
        this.locationLevel = locationLevel;
    }

    public int getParentLocationId() {
        return parentLocationId;
    }

    public void setParentLocationId(int parentLocationId) {
        this.parentLocationId = parentLocationId;
    }

    @Override
    public String toString() {
        return "Location{" +
                "locationName: " + locationID +
                ", locationID: '" + locationName + '\'' +
                ", locationLevel: " + locationLevel +
                ", parentLocationId: " + parentLocationId +
                '}';
    }

    public String toCsvString(){
        return locationName + "," + locationID + "," + locationLevel + "," + parentLocationId;
    }
}
